package com.kly.service;

import com.fqgj.common.api.Response;
import com.kly.dto.AddOrderReq;
import com.kly.dto.ProductDto;
import com.kly.dto.TOrderDto;

import java.util.List;

public interface TOrderService {
    Response<List<TOrderDto>> queryOrder(String userCode);

    Response<List<TOrderDto>> queryOrderByPurchaseToken(String purchaseToken, String appCode);

    Response<TOrderDto> queryLatestOrderByPurchaseToken(String purchaseToken, String appCode);

    Response<TOrderDto> queryLatestSubscriptionsOrderByUserCode(String userCode);

    Response<TOrderDto> queryOrderByOrderNo(String orderNo);

    Response<TOrderDto> queryOrderByOrderNo2(String orderNo);

    Response<TOrderDto> saveOrder(String userCode, ProductDto product);

    Response<TOrderDto> saveOrder(AddOrderReq req);

    Response<TOrderDto> subscriptionOrder(String orderNo, String newOrderId, String purchaseToken);

    Response<String> updateOrder(TOrderDto tOrderDto);

    /**
     * 获取上一笔订阅成功的订单
     */
    Response<TOrderDto> queryLatestSubscriptionsOrder(String userCode);

    /**
     * 获取购买成功订单
     */
    Response<List<TOrderDto>> listPaidOrder();


}
